<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 数组迭代</title>
</head>
<body>
<h2>Array.some()</h2>
<p>some() 方法检查某些数组值是否通过了测试。</p>

<p id="demo"></p>
<script>
  var numbers=[45,4,9,16,25];
  var someOver18=numbers.some(myFunction);

  document.getElementById("demo").innerHTML="某些值大于18是："+someOver18;

  function myFunction(value,index,array){
    return value>18;
  }
</script>
</body>
</html>

<!--
运行结果：
某些值大于 18 是：true
-->